<%@ page language="java" contentType="text/html;charset=UTF-8" %>
<%@ include file="/static/include/taglib.jsp" %>
<!DOCTYPE html>
<html>
<head>
    <meta name="viewport" content="width=device-width"/>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <title>后台管理--菜单列表</title>
    <link href="${ctxStatic}/layui/css/layui.css" rel="stylesheet"/>
    <link href="${ctxStatic}/css/kpiui.css" rel="stylesheet"/>
    <script src="${ctxStatic}/js/jquery-1.8.3.min.js?v=2.0" type="text/javascript"></script>
    <script src="${ctxStatic}/layui/layui.all.js" type="text/javascript"></script>
    <script src="${ctxStatic}/js/common.js" type="text/javascript"></script>
    <script src="${ctxStatic}/js/attendance/atttb.js" type="text/javascript"></script>
    <style>

        #plugin {

            margin-top: -20px;

        }

    </style>
</head>
<body>

<div class="pageInfo">

    <h1 style="    text-align: center;
    margin-top: 20px;
    color: white;">
        房山区公安局<span class="year"></span>年 <span class="month"></span> 津贴公示
    </h1>

</div>

<div class="mess">
    <h1 style="text-align: center;
    color: white;
    margin-top: 20px;">当前没有公示信息</h1>
</div>
<iframe id="fileData" style="width:98%;height: 90%;margin-left: 30px"></iframe>
</body>

<script>


    $(function () {

        $('.year').text(new Date().getFullYear());
        $('.month').text(new Date().getMonth() + 1)
        $.ajax({
            type: "POST",
            url: "showPDF",
            data: {
                year: new Date().getFullYear(),
                month: new Date().getMonth() + 1
            },
            beforeSend: function (XHR) {

            },
            success: function (data) {
                console.log('pdf url--' + data)
                if (data != '') {
                    $('#fileData').attr('src', data);
                    $('.mess').hide();
                    $('.pageInfo').show();
                    $('#fileData').show();
                    $('#plugin').css('margin-top', -20)

                }
                else {
                    $('.mess').show();
                    $('.pageInfo').hide();
                    $('#fileData').hide();
                }
            },
            complete: function (XHR) {

            },
            error: function () {

            }
        });
    })


</script>
</html>
